package com.lzhsite.technology.designPattern.mediator.GeneralDemo;

public class ConcreteMediator extends Mediator
{
    private ColleagueA colleagueA;
    private ColleagueB colleagueB;

    public ConcreteMediator()
    {
        colleagueA = new ColleagueA();
        colleagueB = new ColleagueB();
    }

    public void notice(String content)
    {
        if (content.equals("boss"))
        {
            colleagueA.action();
        }
        if (content.equals("client"))
        {
            colleagueB.action();
        }
    }
}
